<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>店主列表的修改页面</title>
<meta name="renderer" content="webkit">	
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">	
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">	
	<meta name="apple-mobile-web-app-status-bar-style" content="black">	
	<meta name="apple-mobile-web-app-capable" content="yes">	
	<meta name="format-detection" content="telephone=no">	
	<link rel="stylesheet" type="text/css" href="/bsc/static/common/layui/css/layui.css" media="all">
	<link rel="stylesheet" type="text/css" href="/bsc/static/common/bootstrap/css/bootstrap.css" media="all">
	<link rel="stylesheet" type="text/css" href="/bsc/static/common/global.css" media="all">
	<link rel="stylesheet" type="text/css" href="/bsc/static/css/personal.css" media="all">
<script type="text/javascript" src="/bsc/static/js/jquery-3.1.1.js"></script>
<script type="text/javascript">
//返回
  function op(){
	  document.forms[0].action="/bsc/shop/revert";
	  document.forms[0].submit();
  }
  $(function(){
 	  //下拉框定值
 	 $("#status").val(${user.status});
 	$("#sex").val(${user.sex}); 
});
  //实时更换图片
  function PreviewImage(imgFile) {
	    var path = window.URL.createObjectURL(imgFile.files[0]);
	    document.getElementById("image").src=  path ;
	}
</script>
</head>
<body>
<form method="post" action="/bsc/shop/save" enctype="multipart/form-data">
<input type="hidden" name="shop_user_id" value="${user.shop_user_id}">
<table border="1" width="80%" rules="all" align="center" class="table table-bordered">
<tr>
<td>店主账号:</td> <td><input class="form-control" type="text" name="account" value="${user.account }"  readonly="readonly"></td>
<td>姓名:</td> <td><input class="form-control" type="text" name="username" value="${user.username }"></td>
</tr>
<tr>
<td>手机:</td> <td><input class="form-control" type="text" name="mobile" value="${user.mobile }"></td>
<td>身份证号:</td> <td><input class="form-control" type="text" name="idno" value="${user.idno }"></td>
</tr>
<tr>
<td>性别:</td> <td><select class="form-control" name="sex" id="sex">
<option value="0">保密</option>
<option value="1">男</option>
<option value="2">女</option>
</select></td>
<td>用户状态:</td> <td><select class="form-control" name="status" id="status">
<option value="0">停用</option>
<option value="1">启用</option>
</select></td>
</tr>
<tr>
<td>电话:</td> <td><input class="form-control" type="text" name="phone" value="${user.phone }"></td>
<td>邮箱:</td> <td><input class="form-control" type="text" name="email" value="${user.email }"></td>
</tr>
<tr>
<td>头像:</td> <td><input type="file" name="file" class="form-control" onchange="PreviewImage(this)">
<input type="hidden" name="photoname" value="${user.photo }" />
  <img alt="" src="/bsc${user.photo }" width="200" height="70" id="image"/> 
</td>
</tr>
</table>
<div align="right" style=" padding-right:130px ; padding-top:10px ;">
<input type="button" class="btn btn-info" style="width: 80px ;height: 30px " value="返回" onclick="op()">
<input type="submit" class="btn btn-info" style="width: 80px ;height: 30px " value="保  存">
</div>
</form>
</body>
</html>